﻿@model Cat_BDSTypeModel
@{
    ViewBag.Title = "CatBDSType_List";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}

@section HeaderContent{

    <script type="text/javascript">

        $(document).ready(function () {
            var page = $("#countPage").val();
            var url = "/CatBDSType/GetCatBDSType";
            loadMore(url, page, 100);
        });


        function openNew() {
            var dt = new Date();
            var href = "/CatBDSType/openEdit?id=&dt=" + dt.getTime();
            $("#popup_content").load(href);
            showPopup('Insert product...');
        }


        function openEdit() {
            var lstSelected = "";
            $("td.classFist div.checked").each(function () {
                //$(this).attr('name');
                lstSelected = lstSelected + ";" + $(this).attr("id");
            });

            var lsCount = lstSelected.length;

            if (lsCount > 37) {
                cusAlert("Bạn chỉ cập nhật thông tin một dữ liệu...");
            }
            else if (lsCount <= 0) {
                cusAlert("Vui lòng chọn dữ liệu để cập nhật");
            }
            else {
                var _DisCode = lstSelected.split(";");
                itemcode = _DisCode[1];

                var dt = new Date();
                var href = "/CatBDSType/openEdit?id=" + itemcode + "&dt=" + dt.getTime();
                $("#popup_content").load(href);
                showPopup('Insert product...');
            }

        }

    </script>

}

@section Toolbar {
<a class="btn_boder btn_new" onclick="openNew()">New</a>

<a class="btn_boder btn_edit" onclick="openEdit()" >Edit</a>
<a class="btn_boder btn_delete">Delete</a>

}

@Html.Hidden("countPage", 1)

<div id="mainDiv">
    <div id="wrapperDiv">
        <table id="tbList" cellpadding="0" cellspacing="0" class="tb_product">

            <tr>
                <th class="classFist" style="width:100px"></th>
                <th>@Cat_BDSTypeModel.FieldName.Code.Translate()</th>
                <th>@Cat_BDSTypeModel.FieldName.BDSLandName.Translate()</th>
                <th>@Cat_BDSTypeModel.FieldName.BDSTypeName.Translate()</th>
                <th>@Cat_BDSTypeModel.FieldName.Note.Translate()</th>
                <th>@Cat_BDSTypeModel.FieldName.UserCreate.Translate()</th>
                <th>@Cat_BDSTypeModel.FieldName.DateCreate.Translate()</th>
            </tr>

        @Html.Partial("UC_CatBDSType_List")

        </table>
    </div>
</div>



